package indzcraft.loader;
import java.util.HashMap;

public class EnchantDB {
	
	HashMap<Integer,Enchant> enchantDB = new HashMap<Integer,Enchant>();
	
	public EnchantDB(){
		populateEnchantDB();
	}
	
	private void populateEnchantDB() {
		enchantDB.put(4076, new Enchant("35agi", "feet", 0, 35, 0, 0, 0, 0, 0, 0));	// feet 35agi
		enchantDB.put(4094, new Enchant("50mastery", "feet", 0, 0, 0, 0, 0, 0, 0, 50));	// feet 50mastery
		enchantDB.put(4105, new Enchant("25agi/runspeed", "feet", 0, 25, 0, 0, 0, 0, 0, 0));	// feet 25agi/runspeed
		enchantDB.put(1099, new Enchant("22agi", "back", 0, 22, 0, 0, 0, 0, 0, 0));	// back 22agi
		enchantDB.put(4100, new Enchant("65crit", "back", 0, 0, 0, 65, 0, 0, 0, 0));	// back 65crit
		enchantDB.put(4102, new Enchant("20stats", "chest", 20, 20, 0, 0, 0, 0, 0, 0));	// chest 20stats
		Enchant wrist130agi = new Enchant("130agi", "wrist", 0, 130, 0, 0, 0, 0, 0, 0);
		wrist130agi.setLeatherworkerOnly(true);
		enchantDB.put(4190, wrist130agi); // wrist 130agi
		enchantDB.put(4258, new Enchant("50agi", "wrist", 0, 50, 0, 0, 0, 0, 0, 0)); // wrist 50agi
		Enchant ring40agi = new Enchant("40agi", "finger", 0, 40, 0, 0, 0, 0, 0, 0);
		ring40agi.setEnchanterOnly(true);
		enchantDB.put(4079, ring40agi); // ring 40agi
		enchantDB.put(4082, new Enchant("50exp", "hands", 0, 0, 0, 0, 50, 0, 0, 0)); // hands 50exp
		enchantDB.put(4068, new Enchant("50haste", "hands", 0, 0, 0, 0, 0, 50, 0, 0)); // hands 50haste
		enchantDB.put(4107, new Enchant("65mastery", "hands", 0, 0, 0, 0, 0, 0, 0, 65)); // hands 65mastery
		enchantDB.put(4204, new Enchant("50agi/25mastery", "shoulder", 0, 50, 0, 0, 0, 0, 0, 25)); // shoulder 50agi/25mastery
		Enchant shoulder130agi25mastery = new Enchant("130agi/25mastery", "shoulder", 0, 130, 0, 0, 0, 0, 0, 25);
		shoulder130agi25mastery.setInscripterOnly(true);
		enchantDB.put(4193, shoulder130agi25mastery); // shoulder 130agi/25mastery
		enchantDB.put(4126, new Enchant("190ap/55crit", "legs", 0, 0, 190, 55, 0, 0, 0, 0)); // legs 190ap/55crit (leatherworker only)
		enchantDB.put(4440, new Enchant("190ap/55crit", "legs", 0, 0, 190, 55, 0, 0, 0, 0)); // legs 190ap/55crit 
		enchantDB.put(4209, new Enchant("60agi/35haste", "head", 0, 60, 0, 0, 0, 35, 0, 0)); // head 60agi/35haste
		
		enchantDB.put(4064, new Enchant("70spellpen", "back", 0, 0, 0, 0, 0, 0, 0, 0)); // 70 spell pen
		
		enchantDB.put(4064, new Enchant("weapon_chain","weapon", 0, 0, 0, 0, 0, 0, 40, 0)); // weapon 40 hit
		enchantDB.put(4083, new Enchant("hurricane","weapon"));
		enchantDB.put(4099, new Enchant("landslide","weapon"));
		
		Enchant leg95agi55crit = new Enchant("Primal Leg Reinforcements", "legs", 0, 95, 0, 55, 0, 0, 0, 0);
		leg95agi55crit.setLeatherworkerOnly(true);
		enchantDB.put(4883, leg95agi55crit); // legs 95agi/55crit
		
		// mop LEVEL_90
		enchantDB.put(4441, new Enchant("windsong","weapon"));
		enchantDB.put(4444, new Enchant("dancing_steel","weapon"));
		Enchant ring160agi = new Enchant("Greater Agility", "finger", 0, 160, 0, 0, 0, 0, 0, 0);
		ring160agi.setEnchanterOnly(true);
		enchantDB.put(4359, ring160agi); // ring 160agi
		Enchant wrist500agi = new Enchant("Fur Lining - Agility", "wrist", 0, 500, 0, 0, 0, 0, 0, 0);
		wrist500agi.setLeatherworkerOnly(true);
		enchantDB.put(4875, wrist500agi); // wrist 500agi
		enchantDB.put(4416, new Enchant("Greater Agility", "wrist", 0, 170, 0, 0, 0, 0, 0, 0)); // wrist 170agi
		enchantDB.put(4411, new Enchant("Mastery", "wrist", 0, 0, 0, 0, 0, 0, 0, 170)); // wrist 170mastery
		enchantDB.put(4429, new Enchant("Pandaren's Step", "feet", 0, 0, 0, 0, 0, 0, 0, 140)); // boots 140mastery
		enchantDB.put(4428, new Enchant("Blurred Speed", "feet", 0, 140, 0, 0, 0, 0, 0, 0)); // boots 140agi
		enchantDB.put(4426, new Enchant("Greater Haste", "feet", 0, 0, 0, 0, 0, 175, 0, 0)); // boots 175haste
		enchantDB.put(4427, new Enchant("Greater Precision", "feet", 0, 0, 0, 0, 0, 0, 175, 0)); // boots 175hit
		enchantDB.put(4419, new Enchant("Glorious Stats", "chest", 80, 80, 0, 0, 0, 0, 0, 0)); // chest 80stats
		enchantDB.put(4430, new Enchant("Greater Haste", "hands", 0, 0, 0, 0, 0, 170, 0, 0)); // hands 170haste
		enchantDB.put(4433, new Enchant("Superior Mastery", "hands", 0, 0, 0, 0, 0, 0, 0, 170)); // hands 170mastery
		enchantDB.put(4431, new Enchant("Superior Expertise", "hands", 0, 0, 0, 0, 170, 0, 0, 0)); // hands 170exp
		enchantDB.put(4421, new Enchant("Accuracy", "back", 0, 0, 0, 0, 0, 0, 180, 0)); // back 180hit
		
		Enchant leg285agi165crit = new Enchant("Primal Leg Reinforcements", "legs", 0, 285, 0, 165, 0, 0, 0, 0);
		leg285agi165crit.setLeatherworkerOnly(true);
		enchantDB.put(4880, leg285agi165crit); // legs 285agi/165
		
		enchantDB.put(4822, new Enchant("Shadowleather Leg Armor", "legs", 0, 285, 0, 165, 0, 0, 0, 0)); // legs 285agi/165
		enchantDB.put(4871, new Enchant("Sha-Touched Leg Armor", "legs", 0, 170, 0, 100, 0, 0, 0, 0)); // legs 170agi/100crit
		enchantDB.put(4908, new Enchant("Tiger Claw Inscription", "shoulder", 0, 120, 0, 80, 0, 0, 0, 0)); // shoulder 120agi/80crit
		enchantDB.put(4804, new Enchant("Greater Tiger Claw Inscription", "shoulder", 0, 200, 0, 100, 0, 0, 0, 0)); // shoulder 200agi/100crit
		Enchant shoulder520agi100crit =  new Enchant("Secret Tiger Claw Inscription", "shoulder", 0, 520, 0, 100, 0, 0, 0, 0);
		shoulder520agi100crit.setInscripterOnly(true);
		enchantDB.put(4914, shoulder520agi100crit); // shoulder520agi100crit
		
		
		Enchant backTailor = new Enchant("swordguard_embroidery", "back");
		backTailor.setTailorOnly(true);
		enchantDB.put(4894, backTailor);
	}
	
	public HashMap<Integer,Enchant> getDB(){
		return enchantDB;
	}
	
	public Enchant getEnchant(int id){
		if(enchantDB.containsKey(id)){
			return enchantDB.get(id);
		}
		System.out.println("unknown enchantid: "+  id);
		return null;
	}
}
